#include "matrix_2d.h"

vector<vector<int>> add2d(vector<vector<int>> v1,vector<vector<int>> v2){
    vector<vector<int>> result (v1.size(),vector<int> (v1[0].size(),0));
    for(int row = 0;row < v1.size();row++){
        for(int col = 0; col<v1[0].size(); col++){
            result[row][col] = v1[row][col] + v2[row][col];
        }
    }
    // 记得返回对象
    return result;
}

void pprint(vector<vector<int>> v1){
    for (vector<int> v:v1) {
        cout << v[0]<<" "<<v[1]<<" "<<v[2]<<endl;
    }
}
void pprint(vector<vector<float >> v1){
    for (vector<float > v:v1) {
        for (float  tmp:v) {
            cout<<" "<<tmp<<endl;
        }
    }
}
